package com.hzit.cart.client;


import com.hzit.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.ResponseBody;

// @FeignClient(value = "hzit-user",fallback = UserClientFallBack.class)
@FeignClient(value = "hzit-user",fallbackFactory = UserClientFallBackFactory.class)
public interface UserClient {
	//1. 查询所有用户列表
	@GetMapping("/user/list")
	@ResponseBody
	R list();

	//2. 根据用户id查询用户
	@GetMapping("/user/findById/{id}")
	@ResponseBody
	R findById(@PathVariable("id") String id);
}
